﻿using Comm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Kinlo.UI.Main.View
{
    /// <summary>
    /// UserLogin.xaml 的交互逻辑
    /// </summary>
    public partial class UserLoginView : Window
    {
        public UserLoginView()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(txtEmpNo.Text.Trim()))
            {
                MessageBox.Show("工号不能空，请重新录入", "错误");
               // return;
            }
            else
            {
                GlobalValues.EmpNo = txtEmpNo.Text.Trim();
                this.DialogResult = true;
               //return;
                //this.Close();
            }
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
           if( MessageBox.Show("确定退出","提示",MessageBoxButton.YesNo,MessageBoxImage.Question)==MessageBoxResult.Yes)
            {
                this.DialogResult = false;
                this.Close();
            }

        }
    }
}
